package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName healthy
 */
@TableName(value ="healthy")
@Data
public class Healthy implements Serializable {
    /**
     * 
     */
    private String weight;

    /**
     * 
     */
    private Double height;

    /**
     * 
     */
    private String stepNumber;

    /**
     * 
     */
    private String sleepTime;

    /**
     * 
     */
    private String heartRate;

    /**
     * 
     */
    private String bloodPressure;

    /**
     * 
     */
    private String stress;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Healthy other = (Healthy) that;
        return (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getStepNumber() == null ? other.getStepNumber() == null : this.getStepNumber().equals(other.getStepNumber()))
            && (this.getSleepTime() == null ? other.getSleepTime() == null : this.getSleepTime().equals(other.getSleepTime()))
            && (this.getHeartRate() == null ? other.getHeartRate() == null : this.getHeartRate().equals(other.getHeartRate()))
            && (this.getBloodPressure() == null ? other.getBloodPressure() == null : this.getBloodPressure().equals(other.getBloodPressure()))
            && (this.getStress() == null ? other.getStress() == null : this.getStress().equals(other.getStress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getStepNumber() == null) ? 0 : getStepNumber().hashCode());
        result = prime * result + ((getSleepTime() == null) ? 0 : getSleepTime().hashCode());
        result = prime * result + ((getHeartRate() == null) ? 0 : getHeartRate().hashCode());
        result = prime * result + ((getBloodPressure() == null) ? 0 : getBloodPressure().hashCode());
        result = prime * result + ((getStress() == null) ? 0 : getStress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", weight=").append(weight);
        sb.append(", height=").append(height);
        sb.append(", stepNumber=").append(stepNumber);
        sb.append(", sleepTime=").append(sleepTime);
        sb.append(", heartRate=").append(heartRate);
        sb.append(", bloodPressure=").append(bloodPressure);
        sb.append(", stress=").append(stress);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}